namespace System.Drawing
{
    using System;
    using System.Collections.Generic;

    internal class SystemPens
    {
        private static Dictionary<Color, Pen> _pens = new Dictionary<Color, Pen>();

        private static Pen GetPen(Color color)
        {
            if (!_pens.ContainsKey(color))
            {
                _pens.Add(color, new Pen(color));
            }
            return _pens[color];
        }

        internal static Pen Control
        {
            get
            {
                return GetPen(SystemColors.Control);
            }
        }

        internal static Pen ControlDark
        {
            get
            {
                return GetPen(SystemColors.ControlDark);
            }
        }

        internal static Pen ControlDarkDark
        {
            get
            {
                return GetPen(SystemColors.ControlDarkDark);
            }
        }

        internal static Pen ControlLightLight
        {
            get
            {
                return GetPen(SystemColors.ControlLightLight);
            }
        }

        internal static Pen WindowFrame
        {
            get
            {
                return GetPen(SystemColors.WindowFrame);
            }
        }
    }
}

